<!--
  // Creation History
  // --------------------------------------------------------------
  //	Company:			HTHK
  //	NAME:				Rate.jsp
  //	TITLE:				Local Cost
  //	FUNCTION:			Add or Update Rate.
  //	BY:				Poly Li
  //	DATE:				2004-01-09
  // --------------------------------------------------------------
-->

<%@ include file="../tssheader.jsp" %>
<%@ page import="tss.rate.*" %>
<%@ page import="tss.options.*" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%@ page import="java.util.Date" %>

<script language="JavaScript" >

function formValidation()
{
	if(isNull(fm.grade," Grade ") )
		return false;
	if(isNull(fm.rate," Rate ") )
		return false;
//	if(isNull(fm.overtimeRate," Overtime Rate ") )
//		return false;
	if(isNotNumeric(fm.rate," Rate ") )
		return false;
//	if(isNotNumeric(fm.overtimeRate," overtimeRate ") )
//		return false;
	return true;
}

</script>

<%
	//Get A Rate Code list
	RateOptions RateOption=new RateOptions();

    //Get A Rate
    RateBean Rate = (RateBean)request.getAttribute("Rate");
    if (Rate==null)
       Rate = new Rate();
    if (formAction!=null && formAction.trim().equalsIgnoreCase("Update"))
       readOnly = new String(" class=read readonly ");

%>
<body>

<h2>Rate Maintenance</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/tss.rate.RateServlet >
<input type=hidden name=formAction value=<%=formAction%> >
<table cols=10 border=0 >
<tr>
  <td>Grade</td>
  <td><input type=text name=grade value="<%=Rate.getGrade()%>" <%=readOnly%> maxlength=60 size=50></td>
</tr>

<tr>
  <td>Rate</td>
  <td><input type=text name=rate value="<%=Rate.getRate()%>" maxlength=15 size=15></td>
</tr>
</table>
<hr>

<p>
  <INPUT type=button value=Save onclick="save()" >
  <INPUT type=button value=Delete  onclick="deleteRecord()"  >
   <INPUT type=reset  value=Cancel >
 <INPUT type=button value=Back onclick=history.back() >

</p>
</form>
<%@ include file="../tssfooter.jsp" %>
</body>
</body>
</html>

